$(function () {

  var swiper = new Swiper('.banner .swiper-container', {
    spaceBetween: 30,
    // autoplay: 3000,
    fade: {
      crossFade: true,
    },

    pagination: {
      el: '.swiper-pagination',
      clickable: true,
    },

    onSlideChangeStart: function (swiper) {
      console.log(swiper.activeIndex, '当前是第几个元素')
      $('.pagination').find('.list-ww').find('.list').removeClass('active')
      $('.pagination').find('.list-ww').eq(swiper.activeIndex).find('.list').addClass('active')
    }
  });

  $('.pagination > .list-ww').on('click',function () {
    $('.pagination').find('.list-ww').find('.list').removeClass('active')
    $(this).find('.list').addClass('active');
    swiper.slideTo($(this).index())
  })
})




